package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ChargingPileMapper;
import com.ruoyi.system.domain.ChargingPile;
import com.ruoyi.system.service.IChargingPileService;

/**
 * 充电桩信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-28
 */
@Service
public class ChargingPileServiceImpl implements IChargingPileService 
{
    @Autowired
    private ChargingPileMapper chargingPileMapper;

    /**
     * 查询充电桩信息
     * 
     * @param cpId 充电桩信息主键
     * @return 充电桩信息
     */
    @Override
    public ChargingPile selectChargingPileByCpId(Integer cpId)
    {
        return chargingPileMapper.selectChargingPileByCpId(cpId);
    }

    /**
     * 查询充电桩信息列表
     * 
     * @param chargingPile 充电桩信息
     * @return 充电桩信息
     */
    @Override
    public List<ChargingPile> selectChargingPileList(ChargingPile chargingPile)
    {
        return chargingPileMapper.selectChargingPileList(chargingPile);
    }

    /**
     * 新增充电桩信息
     * 
     * @param chargingPile 充电桩信息
     * @return 结果
     */
    @Override
    public int insertChargingPile(ChargingPile chargingPile)
    {
        return chargingPileMapper.insertChargingPile(chargingPile);
    }

    /**
     * 修改充电桩信息
     * 
     * @param chargingPile 充电桩信息
     * @return 结果
     */
    @Override
    public int updateChargingPile(ChargingPile chargingPile)
    {
        return chargingPileMapper.updateChargingPile(chargingPile);
    }

    /**
     * 批量删除充电桩信息
     * 
     * @param cpIds 需要删除的充电桩信息主键
     * @return 结果
     */
    @Override
    public int deleteChargingPileByCpIds(Integer[] cpIds)
    {
        return chargingPileMapper.deleteChargingPileByCpIds(cpIds);
    }

    /**
     * 删除充电桩信息信息
     * 
     * @param cpId 充电桩信息主键
     * @return 结果
     */
    @Override
    public int deleteChargingPileByCpId(Integer cpId)
    {
        return chargingPileMapper.deleteChargingPileByCpId(cpId);
    }
}
